package com.evony.common.module.rank 
{
    import com.evony.common.*;
    import com.evony.common.beans.*;
    import mx.collections.*;
    
    public class TopVotesPlayersResponse extends com.evony.common.BaseBean
    {
        public function TopVotesPlayersResponse(arg1:String, arg2:Object, arg3:Boolean=false, arg4:Boolean=false)
        {
            var loc1:*=0;
            var loc2:*=null;
            beansArray = new mx.collections.ArrayCollection();
            super(arg1, arg3, arg4);
            if (arg2.errorMsg != null) 
            {
                this.errorMsg = arg2.errorMsg;
            }
            if (arg2.msg != null) 
            {
                this.msg = arg2.msg;
            }
            if (arg2.ok != null) 
            {
                this.ok = arg2.ok;
            }
            if (arg2.packageId != null) 
            {
                this.packageId = arg2.packageId;
            }
            if (arg2.beans) 
            {
                loc1 = 0;
                while (loc1 < arg2.beans.length) 
                {
                    loc2 = new com.evony.common.beans.PlayerInfoBean(arg2.beans[loc1]);
                    this.beansArray.addItem(loc2);
                    ++loc1;
                }
            }
            return;
        }

        public function setBeans(arg1:com.evony.common.beans.PlayerInfoBean, arg2:int):void
        {
            this.beansArray[arg2] = arg1;
            return;
        }

        public function getBeans(arg1:int):com.evony.common.beans.PlayerInfoBean
        {
            var loc1:*=this.beansArray[arg1] as com.evony.common.beans.PlayerInfoBean;
            return loc1;
        }

        public override function toDebugString(arg1:String=""):String
        {
            var loc1:*=0;
            var loc2:*="---- TopVotesPlayersResponse ----\n";
            loc2 = loc2 + (arg1 + "errorMsg = " + this.errorMsg + "\n");
            loc2 = loc2 + (arg1 + "msg = " + this.msg + "\n");
            loc2 = loc2 + (arg1 + "ok = " + this.ok + "\n");
            loc2 = loc2 + (arg1 + "packageId = " + this.packageId + "\n");
            loc1 = 0;
            while (loc1 < this.beansArray.length) 
            {
                loc2 = loc2 + this.getBeans(loc1).toDebugString(arg1 + "beans[" + loc1 + "].");
                ++loc1;
            }
            return loc2;
        }

        public function copyTo(arg1:com.evony.common.module.rank.TopVotesPlayersResponse):void
        {
            arg1.errorMsg = this.errorMsg;
            arg1.msg = this.msg;
            arg1.ok = this.ok;
            arg1.packageId = this.packageId;
            com.evony.common.CommonUtil.arrayCopy(this.beansArray, arg1.beansArray);
            return;
        }

        public function toObject():Object
        {
            var loc1:*=new Object();
            loc1.errorMsg = this.errorMsg;
            loc1.msg = this.msg;
            loc1.ok = this.ok;
            loc1.packageId = this.packageId;
            return loc1;
        }

        public var msg:String;

        public var packageId:Number;

        public var beansArray:mx.collections.ArrayCollection;

        public var errorMsg:String;

        public var ok:int;
    }
}
